package com.simple.datax;
import java.util.ArrayList;
import java.util.List;

import org.apache.activemq.ActiveMQConnection;

import com.simple.datax.conn.impl.LocalFileConnImpl;
import com.simple.datax.core.model.connpara.CommonConnPara;
import com.simple.datax.service.DBLoaderService;


public class DBLoaderSimulator implements DBLoaderService {

	@Override
	public List<CommonConnPara> getRecvConnParas() {
		List<CommonConnPara> ret = new ArrayList<CommonConnPara>(1000);
		CommonConnPara para = null;
		
//		for (int i=0; i<100; i++) {
			for (int j=1; j<100; j++) {
				para = new CommonConnPara();
				ret.add(para);
//				para.setTransportType(FTPConnImpl.TYPE);
//				IP$PORT$USERNAME$PASSWORD$WORKING_PATH$NEED_CLIENT_CERT$NEED_SERVER_CERT$CLIENT_KEYSTORE_PATH$SERVER_KEYSTORE_PATH$CLIENT_KEYSTORE_PASSWORD$SERVER_KEYSTORE_PASSWORD
//				para.setTransportPara("10.2.3.52$21$jy$jy$"+"/"+j); //FTP
				
//				para.setTransportType(MSMQConnImpl.TYPE);
//				para.setTransportPara("DIRECT=TCP:10.2.3.52\\private$\\Test");// MSMQ
				
//				para.setTransportType(IBMMQConnImpl.TYPE);
//				IP$PORT$USERNAME$PASSWORD$CCID$QUEUE_MANAGER_NAME$CHANNEL$QUEUE_NAME
//				para.setTransportPara("10.2.3.52$1500$mqadmin$Art515940$1381$RemoteSend$JAVA.CHANNEL$SendQueue"); //IBMMQ

//				para.setTransportType(ActiveMQConnImpl.TYPE);
//				TCP://IP:PORT$USERNAME$PASSWORD$QUEUE_NAME
				para.setTransportPara("tcp://JoeJinWin7:61616$"+ActiveMQConnection.DEFAULT_USER+"$"+ActiveMQConnection.DEFAULT_PASSWORD+"$QUEUE_"+j); //ActiveMQ
				
//				para.setTransportType(SFTPConnImpl.TYPE);
//				IP$PORT$USERNAME$PASSWORD$WORKING_PATH$
//				para.setTransportPara("111.13.47.157$2226$qicai$qicai$ $");
				
//				para.setTransportType(HornetqConnImpl.TYPE);
//				IP$PORT$QUEUE_NAME
//				para.setTransportPara("localhost$5445$DLQ");
				
				para.setTransportType(LocalFileConnImpl.TYPE);
//				DIRECTORY
				para.setTransportPara("test_input_"+j);
			}
//		}
		return ret;
	}

}
